Known ranging devices include time-of-flight (TOF) type range sensors (for example, see Patent Literature 1.) A ranging device disclosed in Patent Literature 1 includes a range sensor provided with a light receiving layer, a photogate electrode for transferring charges, and a floating diffusion layer for taking the charges. In this ranging device, charges generated in the light receiving layer due to incident pulse light are allowed to flow into the floating diffusion layer by imparting the photogate electrode with pulse signals. The flowing charges are accumulated in the floating diffusion layer as signal charges. The charges accumulated in the floating diffusion layer are read out as output corresponding to a quantity of the accumulated charges. A distance to an object is calculated based on the output.